﻿using Microsoft.AspNetCore.Mvc;

namespace Link_eLab.Jwt.Service
{
    /// <summary>
    /// 
    /// </summary>
    public interface IAuthService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="clientType">客户端</param>
        /// <param name="phone">电话号码</param>
        /// <param name="password">密码</param>
        /// <returns>JSON结果集</returns>
        public JsonResult AccessAuthorization(int clientType, string phone, string password);

        /// <summary>
        /// 获取权限
        /// </summary>
        /// <param name="phone">电话号码</param>
        /// <returns>JSON结果集</returns>
        public JsonResult GetPermission(string phone);

        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <returns>JSON结果集</returns>
        public JsonResult GetAdmin(string id);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="id">用户ID</param>
        /// <param name="oldPassword">旧密码</param>
        /// <param name="newPassword">新密码</param>
        /// <returns>JSON结果集</returns>
        public JsonResult UpdatePassword(string id, string oldPassword, string newPassword);
    }
}